﻿using Sustainalytics.ClientDW.Entities;
using System;
using System.Collections.Generic;

namespace Sustainalytics.ClientDW.DataAccessLayer
{
    public interface IClientDWGlobalCompactRepository
    {
        void SetDatabase(string connectionString);

        void Cleanup();

        #region CurrentQuarter

        GCCurrentQuarter GetCurrentQuarter();

        void SaveCurrentQuarter(GCCurrentQuarter document);

        #endregion

        #region GCOverallCompanySummaryExtended

        int GetGCOverallCompanySummaryExtendedCount(GCOverallCompanySummaryExtendedFilters filters, List<int> universeIds, GCAssessment? overallAssessment);

        List<GCOverallCompanySummaryExtended> GetGCOverallCompanySummaryExtendedList(
            GCOverallCompanySummaryExtendedFilters filters,
            List<int> universeIds,
            GCAssessment? overallAssessment, int? skip, int? take, string[] orderBy = null, bool orderByAsc = true);

        void SaveGcOverallCompanyExtended(List<GCOverallCompanySummaryExtended> documents);

        #endregion

        #region GCOverallCompanySummary

        GCOverallCompanySummary GetGCOverallCompanySummaryByCompany(List<int> universeIds, Guid companyId, GCAssessment? overallAssessment, bool intersectUniverse = true);

        void SaveGcOverallCompanySummary(List<GCOverallCompanySummary> documents);

        #endregion

        #region GCPrincipleConclusion

        GCPrincipleConclusion GetGCPrincipleConclusionByPrincipleSummary(Guid principleSummaryId);

        void SaveGcPrincipleConclusion(List<GCPrincipleConclusion> documents);

        #endregion

        #region GCPrincipleEventIndicatorImpact

        List<GCPrincipleEventIndicatorImpact> GetGCPrincipleEventIndicatorImpactList(Guid principleSummaryId);

        void SaveGCPrincipleEventIndicatorImpact(List<GCPrincipleEventIndicatorImpact> documents);

        #endregion

        #region GCPrincipleEventIndicator

        List<GCPrincipleEventIndicator> GetGCPrincipleEventIndicatorList(Guid principleSummaryId);

        void SaveGCPrincipleEventIndicator(List<GCPrincipleEventIndicator> documents);

        void SaveGCPrincipleEventIndicatorExtended(List<GCPrincipleEventIndicatorExtended> documents);

        List<GCPrincipleEventIndicatorExtended> GetGCPrincipleEventIndicatorExtendedList(Guid companyId, GCAssessment? overallAssessment);

        #endregion

        #region GCPrincipleEventIndicatorManagement

        List<GCPrincipleEventIndicatorManagement> GetGCPrincipleEventIndicatorManagementList(Guid principleSummaryId);

        void SaveGCPrincipleEventIndicatorManagement(List<GCPrincipleEventIndicatorManagement> documents);

        #endregion

        #region GCPrincipleSummary

        List<GCPrincipleSummary> GetGCPrincipleSummaryList(Guid companyId, GCAssessment? overallAssessment);

        List<GCPrincipleSummaryExtended> GetGCPrincipleSummaryExtendedList(Guid companyId, GCAssessment? overallAssessment);

        int GetGCPrincipleSummaryCount(Guid companyId, GCAssessment? overallAssessment);

        void SaveGCPrincipleSummary(List<GCPrincipleSummary> documents);

        void SaveGCPrincipleSummaryExtended(List<GCPrincipleSummaryExtended> documents);

        #endregion

        #region GCSource

        List<GCSource> GetGCSourceList(Guid companyId, int? type, GCAssessment? eventIndicatorAssessment);

        void SaveGCSources(List<GCSource> documents);

        #endregion
    }
}
